package com.neucloud.da.edgeside.model.enums;


public enum InferenceTypeEnum {

    ONLINE(1, "online-","model/script/unified.py","/inference_service.py","/inference_service.json","在线推理服务"),
    OFFLINE(2, "offline-","model/script/bat_unified.py","/bat_inference_service.py","","批量推理服务"),
    ;
    public final Integer code;
    //推理服务前缀
    public final String prefix;
    public final String unifyScript;
    //推理服务前后处理文件名
    public final String suffix;
    //参数文件
    public final String argFile;
    public final String desc;
    InferenceTypeEnum(Integer code, String prefix, String unifyScript, String suffix, String argFile, String desc){
        this.code = code;
        this.prefix = prefix;
        this.unifyScript = unifyScript;
        this.suffix = suffix;
        this.argFile = argFile;
        this.desc = desc;
    }

    public static InferenceTypeEnum getByCode(Integer code) {
        for (InferenceTypeEnum enumValue : values()) {
            if (enumValue.code.equals(code)) {
                return enumValue;
            }
        }
        return null;
    }

}